var current_event_visibility=false;

function toggle_submenu(id){
	var elementIdOffset = id.lastIndexOf(":")+1;
	if(elementIdOffset==0){ return;}
	var elementID = id.substring(elementIdOffset);
	var isVisible; 
	
	switch(elementID){
		case "current_event_submenu":
			current_event_visibility = !current_event_visibility;
			isVisible = current_event_visibility;
			break;
	}
	
	var panel = document.getElementById(id);
	panel.className = isVisible ? "submenu_visible" : "submenu_hidden";
	return;
}